<template>
	<view class="content">
		<image :src="baseurl+bg" class="bg"></image>
		<view class="videoBox">
			<video :src="baseurl+'/index/mtzd.mp4'" :controls="true" autoplay="true" class="video"></video>
		</view>
		<swiper class="swiperBox" autoplay="true" :interval="3000" :duration="1000">
			<swiper-item class="swiperItem" v-for="(item,index) in banner" :key="index">
				<image :src="baseurl+item.url" class="bannerImg"></image>
				<text class="bannerText">{{item.text}}</text>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				baseurl: this.$baseurl,
				bg: 'index/mtzdbg.png',
				banner: [{
						url: '/index/swiper1.jpg',
						text: '2023年度房地产开发建设示范企业'
					},
					{
						url: '/index/swiper2.jpg',
						text: '2023年度房地产销售优秀企业'
					},
					{
						url: '/index/swiper3.jpg',
						text: '2023年度纳税先进企业'
					},
					{
						url: '/index/swiper4.jpg',
						text: '2023绵阳房地产宜居品质楼盘'
					},
					{
						url: '/index/swiper5.jpg',
						text: '2023年度房地产品牌开发商'
					},
					{
						url: '/index/swiper6.jpg',
						text: '2023年度绵阳市房地产业协会工作先进单位'
					}
				]
			}
		},
		onShow() {
			console.log("这是首页")
			console.log(this.imgUrl)
			// this.$request.get('recommendList').then(res => {
			// 	console.log(res.data.data);
			// })
		},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.swiperBox {
		position: absolute;
		width: 590rpx;
		height: 480rpx;
		top: 3843rpx;
		left: 80rpx;
		.bannerText {
			display: block;
			width: 100%;
			font-size: 26rpx;
			text-align: center;
			margin-top: 45rpx;
		}

		.bannerImg {
			width: 590rpx;
			height: 385rpx;
		}
	}

	.videoBox {
		position: absolute;
		width: 590rpx;
		height: 290rpx;
		top: 2392rpx;
		left: 80rpx;
		.video {
			width: 100%;
			height: 100%;
		}
	}

	.bg {
		width: 750rpx;
		height: 4386rpx;
	}

	.content {
		width: 100%;
		height: 100%;
		background: #fff;
	}
</style>